package com.mlethe.library.socialtool.entity;

import android.graphics.Bitmap;

/**
 * 小程序分享实体(仅支持微信、QQ)
 * @author Mlethe
 */
public class ShareMiniProgram extends Share {
    /**
     * 兼容低版本的网页链接
     */
    private String webpageUrl;
    /**
     * 小程序的原始id
     */
    private String userName;
    /**
     * 小程序的path
     */
    private String path;
    /**
     * 正式版:0，测试版:1，体验版:2 （QQ没有测试版）
     */
    private int type = -1;
    /**
     * 是否使用带shareTicket的分享
     */
    private boolean withShareTicket;

    public ShareMiniProgram(String webpageUrl, String userName, String path, int type, String title, String desc) {
        super(title, desc);
        this.webpageUrl = webpageUrl;
        this.userName = userName;
        this.path = path;
        this.type = type;
    }

    public ShareMiniProgram(String webpageUrl, String userName, String path, int type, String title, String desc, int drawableId) {
        super(title, desc, drawableId);
        this.webpageUrl = webpageUrl;
        this.userName = userName;
        this.path = path;
        this.type = type;
    }

    public ShareMiniProgram(String webpageUrl, String userName, String path, int type, String title, String desc, Bitmap bitmap) {
        super(title, desc, bitmap);
        this.webpageUrl = webpageUrl;
        this.userName = userName;
        this.path = path;
        this.type = type;
    }

    public ShareMiniProgram(String webpageUrl, String userName, String path, int type, String title, String desc, String imageUrl) {
        super(title, desc, imageUrl);
        this.webpageUrl = webpageUrl;
        this.userName = userName;
        this.path = path;
        this.type = type;
    }

    public ShareMiniProgram(String webpageUrl, String userName, String path, int type, String title, String desc, byte[] imageData) {
        super(title, desc, imageData);
        this.webpageUrl = webpageUrl;
        this.userName = userName;
        this.path = path;
        this.type = type;
    }

    public String getWebpageUrl() {
        return webpageUrl;
    }

    public String getUserName() {
        return userName;
    }

    public String getPath() {
        return path;
    }

    public int getType() {
        return type;
    }

    public boolean isWithShareTicket() {
        return withShareTicket;
    }

    public void setWithShareTicket(boolean withShareTicket) {
        this.withShareTicket = withShareTicket;
    }
}
